<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>登陆帐号</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/frame.css">
    <link rel="stylesheet" href="../css/addClass.css">
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
    <div class="frame-header"><span class="page-reload cur"></span></div>
    <!--操作栏-->
    <div class="operates clearfix" style="overflow: auto;white-space: nowrap; font-size: 0;">
        <div class="right-btns" style="font-size: 0">
            <button class="btn delete pramary" onclick="fun(1)">批量同意</button>
            <button class="btn delete pramary" onclick="fun(2)">批量驳回</button>
            <button class="btn delete pramary">审核</button>
            <button class="btn delete pramary">删除</button>
        </div>
    </div>
    <!--表格-->
    <div class="table-wrapper pl27 " style="min-width: 3000px;">
        <table class="table text-center">
            <thead>
                <tr>
                    <th style="width: 2%;" class="yt">
                       <input type="checkbox" class="allCheck" id="allCheck" name="allCheck" onclick="selectAll()">
                       <label for="all">&nbsp;&nbsp;&nbsp;</label>
                    </th>
                    <th style="width: 3%;" class="sort cur">序列号
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="sort cur" style="width:6%">申请序列
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="sort cur" style="width: 4%;">用户名
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="sort cur" style="width: 4%;">真实姓名
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 6%;">联系方式
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="sort cur" style="width: 5%;">身份证号码
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 3%;">邮箱
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 3%;">家庭详细地址
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 3%;">寄卡地址
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 6%;">学历状况
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 3%;">婚姻状况
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 3%;">房产情况
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 6%;">所在公司
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 6%;">担任职位
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 3%;">单位详细地址
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 6%;">申请时间
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                    <th class="no-nowrap sort cur" style="width: 6%;">操作
                        <img class="bottom" src="../img/jt-bottom.png" alt="">
                        <img class="top" style="display: none" src="../img/jt-right-co.png" alt="">
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="good,userStat : ${session.cartapplication}">
                    <td>
                        <input type="checkbox" name="id" id="${good.applyid}" th:value="${good.applyid}"> 
                        <label for="ph1"></label>
                    </td>
                    <td>
                        <p><span th:text="${good.id}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.applyid}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.name}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.realname}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.phone}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.cartnumber}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.email}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.address}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.sendaddress}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.education}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.marriage}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.ifhaveroom}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.unitname}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.job}">null</span></p>
                    </td>
                    <td>
                        <p><span th:text="${good.companyaddress}">null</span></p>
                    </td>
            		<td>
                        <p><span th:text="${#dates.format(good.createtime,'yyyy-MM-dd')}">null</span></p>
                    </td>
                    <td>
                        <p><a th:href ="@{/agreementApply.do(applyid=${good.applyid})}">同意申请</a>
                        &nbsp;&nbsp;&nbsp;
                        <a th:href ="@{/rejectApply.do(applyid=${good.applyid})}">驳回申请</a></p>
                    </td>
                </tr>
                
            </tbody>
        </table>
    </div>
</body>
<span th:replace="common/links-tpl::common-links-tpl"></span>
<script type="text/javascript" src="/js/plugin/jquery.twbsPagination.min.js"></script>
<script type="text/javascript" src="/js/plugins-override.js"></script>
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/plugin/jquery.form.js"></script>
<script type="text/javascript" th:inline="javascript">
	
	/* 批量处理的全选与全不选操作 */
	function selectAll(){
		//id=all是全选/反选的checkbox，判断是选中还是没选中
		var isChecked=$("#allCheck").is(':checked');
		//获取所有checkbox组成的数组
		var checkedArrs=$("input[type='checkbox']:checked");
		//判断是全选还是反选
		if(isChecked){
			$("input[type='checkbox']").each(function(){
				$(this).prop('checked',true);
			});
		}else{
			$("input[type='checkbox']").each(function(){
				$(this).prop('checked',false);
			});
		}
	}
	
	/* 获取check中被选中的值  */
	function fun(ch){
	    obj = document.getElementsByName("id");
	    check_val = [];
	    for(k in obj){
	        if(obj[k].checked)
	            check_val.push(obj[k].value);
	    }
	    
	 	 //批量同意
	    if(ch == 1){
	    	location.href = "/agreementApply.do?applyid=" + check_val ;
	    }
		  //批量驳回
	    if(ch == 2){
	    	location.href = "/rejectApply.do?applyid=" + check_val ;
	    }
	    	
	}

</script>
</html>